package com.uid.service;

import com.uid.model.UniqueIdSequence;
import com.xr.service.IBaseService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Arnold Yang
 * @since 2018-02-21
 */
public interface IUniqueIdSequenceService extends IBaseService<UniqueIdSequence> {

  /**
   * 根据type生产唯一id
   * @param uid
   * @return
   * @throws Exception
   */
  long replaceInto(UniqueIdSequence uid) throws Exception;

  /**
   * 根据stub查询唯一id
   * @param stub
   * @return
   * @throws Exception
   */
  long nextId(int stub) throws Exception;

}
